﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

//资源请求类型
public enum RequestType
{
    LOAD,
    UNLOAD,
    LOADLEVEL,
    UNLOADLEVEL,
}

class Request
{
    internal string mFileName;              //请求资源相对Assets/完整路径名称
    internal ResourceType mResourceType;
    //委托回调函数
    internal ResourcesManager.HandleFinishLoad mHandle;
    internal ResourcesManager.HandleFinishLoadLevel mHandleLevel;
    internal ResourcesManager.HandleFinishUnLoadLevel mHandleUnloadLevel;
    internal RequestType mRequestType;
    internal ResourceAsyncOperation mResourceAsyncOperation;

    //构造函数
    internal Request(string fileName, ResourceType resourceType, ResourcesManager.HandleFinishLoad handle, RequestType requestType, ResourceAsyncOperation operation)
    {
        mFileName = fileName;
        mResourceType = resourceType;
        mHandle = handle;
        mRequestType = requestType;
        mResourceAsyncOperation = operation;
    }
    //构造函数
    internal Request(string fileName, ResourceType resourceType, ResourcesManager.HandleFinishLoadLevel handle, RequestType requestType, ResourceAsyncOperation operation)
    {
        mFileName = fileName;
        mResourceType = resourceType;
        mHandleLevel = handle;
        mRequestType = requestType;
        mResourceAsyncOperation = operation;
    }

}
